package co.yixiang.modules.system.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;

/**
 * @BelongsProject: gking-card-management
 * @BelongsPackage: co.yixiang.modules.system.enums
 * @Author: seven
 * @CreateTime: 2020-10-26 09:31
 * @Description: 导出状态枚举类
 */
@Getter
@AllArgsConstructor
public enum ExportStatusEnum {

    /**
     * 未导出
     */
    PASS("1", "未导出"),

    /**
     * 已导出
     */
    REJECT("2", "已导出");

    private String value;

    private String desc;

    public static ExportStatusEnum toType(String value) {
        return Stream.of(ExportStatusEnum.values())
                .filter(p -> p.value.equals(value))
                .findAny()
                .orElse(null);
    }

    public String value() {
        return this.value;
    }
}
